#ifndef CLOCK_H
#define CLOCK_H

#include <QWidget>
#include <QTime>
#include <QTimer>

namespace Ui {
    class Clock;
}

class Clock : public QWidget
{
    Q_OBJECT

public:
    explicit Clock(QWidget *parent = 0);
    ~Clock();
    enum modes { kClock, kChrono, kChronoStop};

public slots:
    void decrementHour();
    void decrementMinute();
    void enableChrono();
    void enableClock();
    void incrementHour();
    void incrementMinute();
    void switchChrono();
    void pauseChrono();
    void resetChrono();
    void startChrono();
    void updateDisplay();

signals:
    void valueChanged(QString value);

private:
    Ui::Clock *ui;
    QTimer *timer;
    QTime clock;
    int mode;
};

#endif // CLOCK_H
